const IS_PROD = ["production", "prod"].includes(process.env.NODE_ENV);
/**babel.config.js增加下面配置按需引入组件vant */
const plugins = [
  [
    "import",
    {
      libraryName: "vant",
      libraryDirectory: "es",
      style: true,
    },
    "vant",
  ],
];
if (IS_PROD) {
  plugins.push("transform-remove-console");
}
module.exports = {
  presets: [
    [
      "@vue/cli-plugin-babel/preset",
      {
        useBuiltIns: "usage",
        corejs: 3,
        targets: {
          ie: "11",
        },
      },
    ],
  ],
  plugins,
};
